﻿using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace LogModule.Interface.Imp {
    // LogService.cs
    public class LogService : ILogService {
        private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
        public void Fatal(string message) => _logger.Fatal(message);

        public void Error(string message) => _logger.Error(message);

        public void Warn(string message) => _logger.Warn(message);
        public void Info(string message) => _logger.Info(message);
        //下面两个实际生产中不会使用
        public void Debug(string message) => _logger.Debug(message);
        public void Trace(string message) => _logger.Debug(message);

       // ------ 增强方法（带异常上下文）------
        public void Error(string message, Exception ex) => _logger.Error(ex, message);
        public void Fatal(string message, Exception ex) => _logger.Fatal(ex, message);



    }
}
